﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WfActivityLibrary.common;
using System.Collections;
using CommonLibrary.DataModel.Basic;

namespace WfActivityLibrary.control
{
	public partial class FrmChoiceYh: Form
	{
        /**
         * 结果
         * result[0]表示按人员(0)还是按职务(1),(2)表示置空
         * result[1]表示人员编码或者职务编码
         * result[2]表示人员名称或者职务[]名称
         * result[3]表示选择按职务的时候，是否按部门(0表示是，1表示否)
         * */
        public ChoiceClrxx result;

        #region 构造

        public FrmChoiceYh(ChoiceClrxx clrxx)
        {
            InitializeComponent();

            result = clrxx;
            showInitInfo(result);
        }

        private void showInitInfo(ChoiceClrxx clrxx)
        {
            //显示初始信息,如果有值显示选择好的信息
            /*
             `
             `
             `
             `填写代码
             `
             `
             `
             `*/
        }


        #endregion

        #region 界面事件

        private void radioButton_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButtonAry.Checked)
            {
                groupBoxRy.Enabled = true;
                groupBoxZw.Enabled = false;
            }
            else if (radioButtonAzw.Checked)
            {
                groupBoxRy.Enabled = false;
                groupBoxZw.Enabled = true;
            }
            else if (radioButtonFqr.Checked)
            {
                groupBoxRy.Enabled = false;
                groupBoxZw.Enabled = false;
            }
            else if (radioButtonZdSyb.Checked)
            {
                groupBoxRy.Enabled = false;
                groupBoxZw.Enabled = false;
            }
        }

        #endregion

        #region 工具栏

        //确定
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            //根据checkbox判断获得clrs
            /*
             `
             `
             `
             `填写代码
             `
             `
             `
             `*/

            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        //关闭
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }

        #endregion
	}
}
